using System;
using System.Collections.Generic;
using System.Text;

namespace Objects
{
    public class QuocTich
    {
        #region QuocTich variables

        private int _Id;
        private String _Ten;
        private int _Status;
        private int _SapXep;

        #endregion

        #region MenhGia properties

        public int Id
        {
            get { return _Id; }
            set { _Id = value; }
        }

        public String Ten
        {
            get { return _Ten; }
            set { _Ten = value; }
        }

        public int Status
        {
            get { return _Status; }
            set { _Status = value; }
        }

        public int SapXep
        {
            get { return _SapXep; }
            set { _SapXep = value; }
        }

        #endregion

        #region IPopulatable<QuocTich> Members

        public QuocTich Populate(System.Data.DataRow reader)
        {
            QuocTich item = new QuocTich();

            try { item.Id = Convert.ToInt32(reader["Id"].ToString()); }
            catch { item.Id = -1; }

            item.Ten = Convert.ToString(reader["Ten"].ToString());

            item.Status = Convert.ToInt32(reader["Status"].ToString());
            item.SapXep = Convert.ToInt32(reader["SapXep"].ToString());

            return item;
        }

        #endregion
    }
}
